package com.example.hospital.api.controller.form;


import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;


/*设置用户米密码规则校验*/
@Data
public class LoginForm {
    @NotBlank(message = "用户名不能为空!")
    @Pattern(regexp = "^[a-zA-Z0-9]{4,16}$", message = "用户名只能是4-16位的字母或数字!")
    private String username;

    @NotBlank(message = "密码不能为空!")
    @Pattern(regexp = "^[a-zA-Z0-9]{6,16}$", message = "密码只能是6-16位的字母或数字!")
    private String password;
}
